package util;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name="List")
public class ListObject<T> {
	private List<T> list;

	public ListObject(){}
	
	public ListObject(List<T> list) {
		this.list = list;
	}

	@XmlElement(name="Item")
	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}
	
	@Override
	public String toString() {
		String result = "";
		for (T obj : list) {
			result += obj.toString() + "\n";
		}
		return result;
	}
}
